import request from '@/utils/request'

// 获取项目下拉
export function getItemSelect(query) {
  return request({
    url: '/zt/process/examples/findAllByProject',
    method: 'get',
    params: query
  })
}

// 获取数据列表
export function getTableList(data) {
  return request({
    url: '/zt/process/examples/findByPage?pageNum='+ data.pageNum + '&pageSize=' + data.pageSize,
    method: 'post',
    data: data
  })
}

// 项目添加
export function addProject(query) {
  return request({
    url: '/zt/process/examples/save',
    method: 'get',
    params: query
  })
}

// 项目删除
export function deleteProject(data) {
  return request({
    url: '/zt/process/examples/delete',
    method: 'delete',
    data: data
  })
}

// 保存阶段设置
export function saveStage(data){
  return request({
    url: '/zt/process/examples/setupPhase',
    method: 'post',
    data: data
  })
}

// 获取专业设置
export function getMajors(query) {
  return request({
    url: '/zt/process/examples/findByMajor',
    method: 'get',
    params: query
  })
}

// 保存专业设置
export function saveMajors(data) {
  return request({
    url: '/zt/process/examples/setupMajor',
    method: 'post',
    data: data
  })
}

// 人员列表
export function getPersonList(query) {
  return request({
    url: '/zt/process/examples/findByFile',
    method: 'get',
    params: query
  })
}

//获取人员树接口
export function deptUserTree(query) {
  return request({
    url: '/system/user/deptUserTreeNoDateScope',
    method: 'GET',
    params: query
  })
}

// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/system/user/deptTree',
    method: 'get'
  })
}

// 设置人员
export function setUpUser(data) {
  return request({
    url: '/zt/process/examples/setupUser',
    method: 'put',
    data: data
  })
}

// 下发任务
export function deliverATask(data) {
  return request({
    url: '/zt/process/examples/deliverATask',
    method: 'post',
    data: data
  })
}

// 获取分配人员树
export function findByDeptUserTree(query) {
  return request({
    url: '/system/user/findByDeptUserTree',
    method: 'get',
    params: query
  })
}
